package com.itcase.interfacedemo.Demo02;

import java.util.ArrayList;

/*
要写注释哦!!!
*/
public class StudentManagerImpl1 extends StudentManageFather implements StudentManager{
    @Override
    public void showInfo() {
        for (int i = 0; i < students.size(); i++) {
            Student student = students.get(i);
            System.out.println("姓名:"+student.getName()+"\t性别:"+student.getGender()+"\t成绩:"+student.getAcore());
        }
    }

    @Override
    public void showInfoByScore() {
        int sum=0;
        for (int i = 0; i < students.size(); i++) {
            Student student = students.get(i);
            sum+=student.getAcore();
        }
        System.out.println("平均成绩为："+sum*1.0/students.size());
    }
}
